﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace BBPA.Admin.SYS.User_Operate_Log
{
    public partial class List : ListPage
    {
        BLL.V_User_Operate_Log bllList = new BLL.V_User_Operate_Log();
        BLL.User_Operate_Log bll = new BLL.User_Operate_Log();
        string Tablename = "";
        int RowID = 0;
        protected void Page_Load(object sender, EventArgs e)
        {
            string type = Request["type"] == null || Request["type"].ToString() == "" ? "" : Request["type"].ToString();
            Master.show_edit = false; Master.show_btn_add = false;
            if (type == "entry")
            {
                Master.BasicSQL = "Tablename='Goods' and UserID=" + Security.GetCurrentUserID().ToString();
                Master.orderBy = " id desc";
            }
            else
            {
                DataTypePlus.getPageRequest(Request.QueryString["Tablename"], ref Tablename);
                DataTypePlus.getPageRequest(Request.QueryString["RowID"], ref RowID);
                if (Tablename != "" && RowID > 0) Master.BasicSQL = "Tablename='" + Tablename + "' and RowID=" + RowID;
            }
        }
        public override void buildSQL_Page_List_search()
        {
        }
        public override DataSet get_Page_DataSet(string sql_, string orderby_, int pageFrom_, int pageTo_) { return bllList.GetListByPage(sql_, orderby_, pageFrom_, pageTo_); }
    }
}